import { createRouter, createWebHistory } from 'vue-router'


const routes = [{
        path: '/',
        name: 'my',
        component: function() {
            return import ('../views/my/my.vue')
        },
        children: []
    },
    {
        path: '/message',
        name: 'message',
        component: function() {
            return import ('../views/my/message.vue')
        },
        children: []
    },
    {
        path: '/study',
        name: 'study',
        component: function() {
            return import ('../views/study/study.vue')
        },
        children: []
    },
    {
        path: '/enroll',
        name: 'enroll',
        component: function() {
            return import ('../views/enroll/enroll.vue')
        },
        children: []
    },
    {
        path: '/notice',
        name: 'notice',
        component: function() {
            return import ('../views/enroll/notice.vue')
        },
        children: []
    },
    {
        path: '/error',
        name: 'error',
        component: function() {
            return import ('../views/enroll/error.vue')
        },
        children: []
    },
    {
        path: '/success',
        name: 'success',
        component: function() {
            return import ('../views/enroll/success.vue')
        },
        children: []
    },
    {
        path: '/enroll/index',
        name: 'index',
        component: function() {
            return import ('../views/enroll/index.vue')
        },
        redirect: '/enroll/guide',
        children: [{
                path: '/enroll/guide',
                name: 'guide',
                title: '报名指南',
                component: function() {
                    return import ('../views/enroll/pages/guide.vue')
                },
            },
            {
                path: '/enroll/pinformation',
                name: 'pinformation',
                title: '个人信息',
                component: function() {
                    return import ('../views/enroll/pages/pinformation.vue')
                },
            },
            {
                path: '/enroll/work',
                name: 'work',
                title: '目前工作',
                component: function() {
                    return import ('../views/enroll/pages/work.vue')
                },
            },
            {
                path: '/enroll/resume',
                name: 'resume',
                title: '工作履历',
                component: function() {
                    return import ('../views/enroll/pages/resume.vue')
                },
            },
            {
                path: '/enroll/education',
                name: 'education',
                title: '学位教育',
                component: function() {
                    return import ('../views/enroll/pages/education.vue')
                },
            },
            {
                path: '/enroll/certificate',
                name: 'certificate',
                title: '证书',
                component: function() {
                    return import ('../views/enroll/pages/certificate.vue')
                },
            },
            {
                path: '/enroll/examination',
                name: 'examination',
                title: '笔试',
                component: function() {
                    return import ('../views/enroll/pages/examination.vue')
                },
            },
            {
                path: '/enroll/activity',
                name: 'activity',
                title: '社团活动',
                component: function() {
                    return import ('../views/enroll/pages/activity.vue')
                },
            },
            {
                path: '/enroll/award',
                name: 'award',
                title: '荣誉及奖励',
                component: function() {
                    return import ('../views/enroll/pages/award.vue')
                },
            },
            {
                path: '/enroll/readme',
                name: 'readme',
                title: '申请人自述',
                component: function() {
                    return import ('../views/enroll/pages/readme.vue')
                },
            },
            {
                path: '/enroll/rinformation',
                name: 'rinformation',
                title: '推荐人信息',
                component: function() {
                    return import ('../views/enroll/pages/rinformation.vue')
                },
            },
            {
                path: '/enroll/material',
                name: 'material',
                title: '材料上传',
                component: function() {
                    return import ('../views/enroll/pages/material.vue')
                },
            },
            {
                path: '/enroll/scholarship',
                name: 'scholarship',
                title: '奖学金申请',
                component: function() {
                    return import ('../views/enroll/pages/scholarship.vue')
                },
            },
            {
                path: '/enroll/other',
                name: 'other',
                title: '其他信息',
                component: function() {
                    return import ('../views/enroll/pages/other.vue')
                },
            },
        ]
    },
    {
        path: '/print',
        name: 'print',
        component: function() {
            return import ('../views/print/print.vue')
        },
        children: []
    },

]

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
})

export default router